import request from '#/utils/requestAbort.js';
import type { IParamsDataType } from './type';

// 查询节点列表
export async function postQueryNodeList(params: { provinceId?: string }) {
  return request('/generation-common/correlaNodeStationConfig/queryNodeList', {
    method: 'POST',
    data: params,
  });
}

// 查询配置列表
export async function postQueryNodeStationList(params: { provinceId?: string }) {
  return request('/generation-common/correlaNodeStationConfig/queryNodeStationList', {
    method: 'POST',
    data: params,
  });
}

// 保存配置
export async function postSaveNodeStation(params: { data: IParamsDataType[]; provinceId: string }) {
  return request('/generation-common/correlaNodeStationConfig/saveNodeStation', {
    method: 'POST',
    data: params,
  });
}

// 省份-交易中心-场站（数据权限）
export async function queryMarketList(menuCode: any) {
  return request(`/power/dataPower/common/${menuCode}/t_station`, {
    method: 'GET',
  });
}
